//
//  File.swift
//
//
//  Created by didi on 2022/9/14.
//

import Fluent
import Foundation
import Molecular

final class UserAccountRoleModel: MolecularDatabaseModel {
    typealias From = UserModule

    struct FieldKeys {
        struct v1 {
            static var accountId: FieldKey { "account_id" }
            static var roleId: FieldKey { "role_id" }
        }
    }

    @ID() var id: UUID?
    @Field(key: FieldKeys.v1.accountId) var accountId: UUID
    @Field(key: FieldKeys.v1.roleId) var roleId: UUID

    init() {}

    init(accountId: UUID, roleId: UUID) {
        self.accountId = accountId
        self.roleId = roleId
    }
}
